package com.icode.web.controller;

import com.icode.core.dto.ShopFormDTO;
import com.icode.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: ZhongGang
 * Date: 13-6-22
 * Time: 上午12:29
 */
@Controller
public class ShopController {

    @Autowired
    private ShopService shopService;

    @RequestMapping("/shops/overview")
    @ResponseBody
    public List<ShopFormDTO> overview() {
        return shopService.loadShops();
    }
}
